<?php
namespace lemon\bootstrap4;

class ActionColumn extends \yii\grid\ActionColumn
{
	public $menu='';
	public $contentOptions = ['class'=>'action-column'];
	
	public function createUrl($action, $model, $key, $index){
		if (is_callable($this->urlCreator)) {
			return call_user_func($this->urlCreator, $action, $model, $key, $index, $this);
		}
		
		$params = is_array($key) ? $key : ['id' => (string) $key];
		$params[0] = $this->controller ? $this->controller . '/' . $action : $action;
		$params['m'] = $this->menu; 
		
		return $params;
	}
}

